home *** CD-ROM | disk | FTP | other *** search
/ Merciful 5 / Merciful - Disc 5.iso / software / h / hypertextdatav40.12cr.lha / HTDS / ARexx / aminet.rexx < prev    next >
Encoding:
OS/2 REXX Batch file  |  1996-10-27  |  1.7 KB  |  70 lines

  1. /*
  2. ** $PROJECT: HyperText-DataType-System
  3. **
  4. ** $VER: aminet.rexx 40.1 (26.10.96)
  5. **
  6. ** $AUTHOR: Stefan Ruppert , Windthorststrasse 5 , 65439 Floersheim , GERMANY
  7. **
  8. ** $COPYRIGHT: (C) Copyright 1996 by Stefan Ruppert, All Rights Reserved!
  9. **
  10. ** $EMAIL: Stefan.Ruppert@informatik.fh-wiesbaden.de
  11. **
  12. ** $REQUIRES: TCP/IP-Stack, FtpMount
  13. **
  14. ** $HISTORY:
  15. **
  16. ** 26.10.96 : 040.001 : initial
  17. **
  18. */
  19.  
  20. Options Results
  21.  
  22. Parse Arg args
  23.  
  24. /* --------------------------- needed libraries --------------------------- */
  25.  
  26. Call AddLib('rexxsupport.library',0,-30,0)
  27. Call AddLib('rexxdossupport.library',0,-30,0)
  28.  
  29. /* -------------------------- customize section --------------------------- */
  30.  
  31. aminet.site      = 'ftp.uni-paderborn.de'
  32. /*aminet.site     = 'localhost'*/
  33. aminet.dir       = 'aminet'
  34. /*aminet.dir      = 'pub/aminet'*/
  35. aminet.localdir = 'Backup:download'
  36.  
  37. /* ------------------------ end customize section ------------------------- */
  38.  
  39. If ReadArgs(args,'FILE/A,SITE/K,DIR/K,LOCALDIR/K,QUIET/S','AMINET.') Then Do
  40.  
  41.    If ~ShowList('h','FTP') Then Do
  42.       Address Command 'Mount ftp:'
  43.  
  44.       If ~ShowList('h','FTP') Then Do
  45.      Say 'Cannot mount ftp-handler.'
  46.      Exit 10
  47.       End
  48.    End
  49.  
  50.    cmd = 'copy FROM="ftp://' || aminet.site || '/' || aminet.dir || '/' || aminet.file || '" TO="' || aminet.localdir || '"'
  51.  
  52.    If ~aminet.quiet Then
  53.       Say 'Running: ' || cmd
  54.  
  55.    Options Failat 21
  56.  
  57.    Address Command cmd
  58.  
  59.    If RC = 0 Then Do
  60.       If ~aminet.quiet Then Do
  61.      localfile  = AddPart(aminet.localdir, FilePart(aminet.file))
  62.      Say 'Aminet download for ' || aminet.file || ' finished :'
  63.      Address Command 'List ' || localfile || ' NOHEAD'
  64.       End
  65.    End
  66.    Else If ~aminet.quiet Then
  67.       Say 'Aminet download for ' || aminet.file || ' failed !'
  68. End
  69.  
  70.